import type { Meta, StoryObj } from "@storybook/react";
import React from "react";
import KxEnvDetectionPieChart from "./index";

const meta = {
  title: "饼图/可信环境检测比例饼图-KxEnvDetectionPieChart",
  component: KxEnvDetectionPieChart,
  tags: ["autodocs"],
  argTypes: {},
  decorators: [
    (Story) => (
      <div
        style={{ backgroundColor: "#031857", height: "500px", width: "451px" }}
      >
        <Story />
      </div>
    ),
  ],
} satisfies Meta<typeof KxEnvDetectionPieChart>;

export default meta;
type Story = StoryObj<typeof meta>;

export const basic: Story = {
  args: {
    dataSource: [
      {
        name: "PM2.5",
        amount: 21,
      },
      {
        name: "TSP",
        amount: 20,
      },
      {
        name: "噪声",
        amount: 27,
      },
      {
        name: "户外温度",
        amount: 20,
      },
    ],
  },
};
